package com.e.dianshang.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Table;
import java.io.Serializable;
import java.sql.Timestamp;

/**
 * @Description: TOOD
 * @ClassName: User
 * @Author: ${陈柯宇}
 * Date: 2020/11/11 14:33
 * @Version: 1.0
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "tb_user")
public class User implements Serializable {

    @Id
    @Column(name = "user_id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    //用户姓名
    @Column(name = "user_name")
    private String name;

    //用户手机号
    @Column(name = "user_openid")
    private String phone;

    //用户密码
    @Column(name = "user_phone")
    private String pwd;

    //用户性别
    @Column(name = "user_sex")
    private String sex;

    //用户所在地
    @Column(name = "user_local")
    private String local;

    //用户邮箱
    @Column(name = "user_email")
    private String email;

    //用户启用状态
    @Column(name = "user_state")
    private Boolean state;

    //用户创建时间
    @Column(name = "user_createDate")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" ,timezone="GMT+8")
    private Timestamp createDate;

}
